<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>xilskey: EFUSE PL</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">xilskey
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;"
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__xilskey__zynq__ultra__efuse.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">EFUSE PL</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gab832f8fd82a6f4797eff212ff27fc3eb"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynq__ultra__efuse.html#gab832f8fd82a6f4797eff212ff27fc3eb">XilSKey_EfusePl_SystemInit</a> (<a class="el" href="struct_xil_s_key___e_pl.html">XilSKey_EPl</a> *InstancePtr)</td></tr>
<tr class="memdesc:gab832f8fd82a6f4797eff212ff27fc3eb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes PL eFUSE with input data given.  <a href="#gab832f8fd82a6f4797eff212ff27fc3eb">More...</a><br/></td></tr>
<tr class="separator:gab832f8fd82a6f4797eff212ff27fc3eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf56f656aaae5bb0ebc9a3fee806fe202"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynq__ultra__efuse.html#gaf56f656aaae5bb0ebc9a3fee806fe202">XilSKey_EfusePl_Program</a> (<a class="el" href="struct_xil_s_key___e_pl.html">XilSKey_EPl</a> *InstancePtr)</td></tr>
<tr class="memdesc:gaf56f656aaae5bb0ebc9a3fee806fe202"><td class="mdescLeft">&#160;</td><td class="mdescRight">Programs PL eFUSE with input data given through InstancePtr.  <a href="#gaf56f656aaae5bb0ebc9a3fee806fe202">More...</a><br/></td></tr>
<tr class="separator:gaf56f656aaae5bb0ebc9a3fee806fe202"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga088a4e3919caebf725f3fdfaa1fecc41"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynq__ultra__efuse.html#ga088a4e3919caebf725f3fdfaa1fecc41">XilSKey_EfusePl_ReadStatus</a> (<a class="el" href="struct_xil_s_key___e_pl.html">XilSKey_EPl</a> *InstancePtr, u32 *StatusBits)</td></tr>
<tr class="memdesc:ga088a4e3919caebf725f3fdfaa1fecc41"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the PL efuse status bits and gets all secure and control bits.  <a href="#ga088a4e3919caebf725f3fdfaa1fecc41">More...</a><br/></td></tr>
<tr class="separator:ga088a4e3919caebf725f3fdfaa1fecc41"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9e00ec217ec5fce9cf298e92050c41db"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynq__ultra__efuse.html#ga9e00ec217ec5fce9cf298e92050c41db">XilSKey_EfusePl_ReadKey</a> (<a class="el" href="struct_xil_s_key___e_pl.html">XilSKey_EPl</a> *InstancePtr)</td></tr>
<tr class="memdesc:ga9e00ec217ec5fce9cf298e92050c41db"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the PL efuse keys and stores them in the corresponding arrays in instance structure.  <a href="#ga9e00ec217ec5fce9cf298e92050c41db">More...</a><br/></td></tr>
<tr class="separator:ga9e00ec217ec5fce9cf298e92050c41db"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gaf56f656aaae5bb0ebc9a3fee806fe202"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 XilSKey_EfusePl_Program </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_xil_s_key___e_pl.html">XilSKey_EPl</a> *&#160;</td>
          <td class="paramname"><em>InstancePtr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Programs PL eFUSE with input data given through InstancePtr. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>- Pointer to PL eFUSE instance which holds the input data to be written to PL eFUSE.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_FAILURE - In case of failure</li>
<li>XST_SUCCESS - In case of Success</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>When this API is called: Initializes the timer, XADC/xsysmon and JTAG server subsystems. Returns an error in the following cases, if the reference clock frequency is not in the range or if the PL DAP ID is not identified, if the system is not in a position to write the requested PL eFUSE bits (because the bits are already written or not allowed to write) if the temperature and voltage are not within range. </dd></dl>
<p>Start using the Jtag server to read the JTAG ID and compare with the stored ID, if it not matches return with unique error code. By reading the Jtag ID we will be sure that the JTAG related stuff is working as expected.</p>
<p>If everything is ok then return PASS.</p>

<p>Referenced by <a class="el" href="xilskey__efuse__example_8c.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main()</a>.</p>

</div>
</div>
<a class="anchor" id="ga9e00ec217ec5fce9cf298e92050c41db"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 XilSKey_EfusePl_ReadKey </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_xil_s_key___e_pl.html">XilSKey_EPl</a> *&#160;</td>
          <td class="paramname"><em>InstancePtr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads the PL efuse keys and stores them in the corresponding arrays in instance structure. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>Pointer to PL eFUSE instance.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><pre class="fragment">  - XST_FAILURE - In case of failure
  - XST_SUCCESS - In case of Success
</pre></dd></dl>
<dl class="section note"><dt>Note</dt><dd>This function initializes the timer, XADC and JTAG server subsystems, if not already done so. In Zynq - Reads AES key and User keys. In Ultrascale - Reads 32 bit and 128 bit User keys and RSA hash But AES key cannot be read directly it can be verified with CRC check (for that we need to update the instance with 32 bit CRC value, API updates whether provided CRC value is matched with actuals or not). To calculate the CRC of expected AES key one can use any of the following APIs <a class="el" href="group__xilskey__cmn__crc.html#gaf973666d5d2787e571a17f6c12d6cd29" title="This function Calculates CRC value based on hexadecimal string passed. ">XilSKey_CrcCalculation()</a> or <a class="el" href="group__xilskey__cmn__crc.html#ga0552daa4e1f376eaac1360aba6d23930" title="Calculates CRC value of the provided key. ">XilSkey_CrcCalculation_AesKey()</a> </dd></dl>

<p>Referenced by <a class="el" href="xilskey__efuse__example_8c.html#a4ea026a1ab321b06be36cf1cb5192148">XilSKey_EfusePl_ReadnCheck()</a>.</p>

</div>
</div>
<a class="anchor" id="ga088a4e3919caebf725f3fdfaa1fecc41"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 XilSKey_EfusePl_ReadStatus </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_xil_s_key___e_pl.html">XilSKey_EPl</a> *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32 *&#160;</td>
          <td class="paramname"><em>StatusBits</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads the PL efuse status bits and gets all secure and control bits. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>Pointer to PL eFUSE instance. </td></tr>
    <tr><td class="paramname">StatusBits</td><td>Buffer to store the status bits read.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><pre class="fragment">  - XST_FAILURE - In case of failure
  - XST_SUCCESS - In case of Success</pre> </dd></dl>

<p>Referenced by <a class="el" href="xilskey__efuse__example_8c.html#a4ea026a1ab321b06be36cf1cb5192148">XilSKey_EfusePl_ReadnCheck()</a>.</p>

</div>
</div>
<a class="anchor" id="gab832f8fd82a6f4797eff212ff27fc3eb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 XilSKey_EfusePl_SystemInit </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_xil_s_key___e_pl.html">XilSKey_EPl</a> *&#160;</td>
          <td class="paramname"><em>InstancePtr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes PL eFUSE with input data given. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>- Input data to be written to PL eFUSE</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><pre class="fragment">  - XST_FAILURE - In case of failure
  - XST_SUCCESS - In case of Success
</pre></dd></dl>
<dl class="section note"><dt>Note</dt><dd>Updates the global variable ErrorCode with error code(if any). </dd></dl>
<p>Start using the Jtag server to read the JTAG ID and compare with the stored ID, if it not matches return with unique error code. By reading the Jtag ID we will be sure that the JTAG related stuff is working as expected.</p>
<p>If everything is ok then return PASS.</p>

<p>References <a class="el" href="group__xilskey__plefuse__error__codes.html#gga8fd80cd0c662e8df2920d23077b48d65a8c019d98249e4139bac40e76d50fc624">XSK_EFUSEPL_ERROR_PL_STRUCT_NULL</a>.</p>

<p>Referenced by <a class="el" href="xilskey__efuse__example_8c.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
